summaryrefslogtreecommitdiff
path: root/app/[lng]/evcp/(evcp)/tech-project-avl/page.tsx
diff options
context:
space:
mode:
authorjoonhoekim <26rote@gmail.com>2025-06-24 01:51:59 +0000
committerjoonhoekim <26rote@gmail.com>2025-06-24 01:51:59 +0000
commit6824e097d768f724cf439b410ccfb1ab9685ac98 (patch)
tree1f297313637878e7a4ad6c89b84d5a2c3e9eb650 /app/[lng]/evcp/(evcp)/tech-project-avl/page.tsx
parentf4825dd3853188de4688fb4a56c0f4e847da314b (diff)
parent4e63d8427d26d0d1b366ddc53650e15f3481fc75 (diff)
(merge) 대표님/최겸 작업사항 머지
Diffstat (limited to 'app/[lng]/evcp/(evcp)/tech-project-avl/page.tsx')
-rw-r--r--app/[lng]/evcp/(evcp)/tech-project-avl/page.tsx85
1 files changed, 85 insertions, 0 deletions
diff --git a/app/[lng]/evcp/(evcp)/tech-project-avl/page.tsx b/app/[lng]/evcp/(evcp)/tech-project-avl/page.tsx
new file mode 100644
index 00000000..d942c5c5
--- /dev/null
+++ b/app/[lng]/evcp/(evcp)/tech-project-avl/page.tsx
@@ -0,0 +1,85 @@
+import * as React from "react"
+import { redirect } from "next/navigation"
+import { getServerSession } from "next-auth/next"
+import { authOptions } from "@/app/api/auth/[...nextauth]/route"
+import { SearchParams } from "@/types/table"
+import { searchParamsCache } from "@/lib/tech-project-avl/validations"
+import { Skeleton } from "@/components/ui/skeleton"
+import { Shell } from "@/components/shell"
+import { AcceptedQuotationsTable } from "@/lib/tech-project-avl/table/accepted-quotations-table"
+import { getAcceptedTechSalesVendorQuotations } from "@/lib/techsales-rfq/service"
+import { getValidFilters } from "@/lib/data-table"
+import { DataTableSkeleton } from "@/components/data-table/data-table-skeleton"
+import { Ellipsis } from "lucide-react"
+
+export interface PageProps {
+ params: Promise<{ lng: string }>
+ searchParams: Promise<SearchParams>
+}
+
+export default async function AcceptedQuotationsPage({
+ params,
+ searchParams,
+}: PageProps) {
+ const { lng } = await params
+
+ const session = await getServerSession(authOptions)
+ if (!session) {
+ redirect(`/${lng}/auth/signin`)
+ }
+
+ const search = await searchParams
+ const { page, perPage, sort, filters, search: searchText } = searchParamsCache.parse(search)
+ const validFilters = getValidFilters(filters ?? [])
+
+ const { data, pageCount } = await getAcceptedTechSalesVendorQuotations({
+ page,
+ perPage: perPage ?? 10,
+ sort,
+ search: searchText,
+ filters: validFilters,
+ })
+
+ return (
+ <Shell className="gap-2">
+ <div className="flex items-center justify-between space-y-2">
+ <div className="flex items-center justify-between space-y-2">
+ <div>
+ <h2 className="text-2xl font-bold tracking-tight">
+ 승인된 견적서(해양TOP,HULL)
+ </h2>
+ <p className="text-muted-foreground">
+ 기술영업 승인 견적서에 대한 요약 정보를 확인하고{" "}
+ <span className="inline-flex items-center whitespace-nowrap">
+ <Ellipsis className="size-3" />
+ <span className="ml-1">버튼</span>
+ </span>
+ 을 통해 RFQ 코드, 설명, 업체명, 업체 코드 등의 상세 정보를 확인할 수 있습니다.
+ </p>
+ </div>
+ </div>
+ </div>
+
+ <React.Suspense fallback={<Skeleton className="h-7 w-52" />}>
+ {/* Date range picker can be added here if needed */}
+ </React.Suspense>
+
+ <React.Suspense
+ fallback={
+ <DataTableSkeleton
+ columnCount={12}
+ searchableColumnCount={2}
+ filterableColumnCount={4}
+ cellWidths={["10rem", "15rem", "12rem", "10rem", "10rem", "12rem", "8rem", "12rem", "10rem", "8rem", "10rem", "10rem"]}
+ shrinkZero
+ />
+ }
+ >
+ <AcceptedQuotationsTable
+ data={data}
+ pageCount={pageCount}
+ />
+ </React.Suspense>
+ </Shell>
+ )
+}